const Router = require('koa-router')()
const score = require('../control/score')
/**
 * @api {post} /score/update 老师成绩考核修改学生成绩
 * @apiName updateScore
 * @apiGroup updateScore
 * @apiDescription 老师成绩考核修改学生成绩
 * @apiParam (params) {String} scoreId 成绩id
 * @apiParam  (params) {String} score {attendance:1,experiment:2,operation:3,other:4,paper:15,performance:4} 课堂表现 作业情况 实验实践 其他 卷面成绩 课堂表现
 * @apiHeaderExample {json} Header:
 * {
 *    "Authorition": "Bearer xxxxxxxxxxxx(登陆时获取的token)"
 *  }
 *
 * @apiSuccessExample 成功
 * {
    "code": 1,
    "data": {
      scoreLists: []
  }
 *
 */
Router.post('/update', score.update)
/**
 * @api {post} /score/inquire 老师成绩考核获取学生成绩
 * @apiName getScore
 * @apiGroup getScore
 * @apiDescription 老师成绩考核获取学生成绩
 * @apiParam (params) {String} course 课程id
 * @apiHeaderExample {json} Header:
 * {
 *    "Authorition": "Bearer xxxxxxxxxxxx(登陆时获取的token)"
 *  }
 *
 * @apiSuccessExample 成功
 * {
    "code": 1,
    "data": {
      scoreLists: []
  }
 *
 */
Router.post('/inquire', score.inquire)

module.exports = Router
